#include<iostream>

using namespace std;

template<typename T>
T max5(T arr[5]);

int main()
{
    int arr1[5] = {-2,3,0,5,1};
    double arr2[5] = {1.2,2.3,-1.2,2.1,1.9};
    int max1 = max5(arr1);
    double max2 = max5(arr2);
    cout << max1 << endl<< max2;

    return 0;
}

template<typename T>
T max5(T arr[5])
{
    T max = arr[0];
    for ( int i = 1; i < 5; i++)
    {
        if ( arr[i] > max)
        max = arr[i];
    }
    return max;
}